/*
package com.xsq.rpc.center.server.config;

import com.alibaba.fastjson.JSON;
import com.xsq.rpc.common.config.ZookeeperConfigurationCentreProperties;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

*/
/**
 * @ClassName HikariDataSourceConfig
 * @Description TODO
 * @Author xsq
 * @Date 2020/6/11 16:59
 **//*

@Configuration
public class HikariDataSourceConfig {

    */
/**
     * 创建一个新的
     *
     * @param zookeeperConfigurationCentreProperties
     * @return
     *//*

    @ConditionalOnMissingBean(DataSource.class)
    @ConditionalOnClass(ZookeeperConfigurationCentreProperties.class)
    @Bean
    private static HikariDataSource createDataSource(ZookeeperConfigurationCentreProperties zookeeperConfigurationCentreProperties) {
        //初始化连接pool
        HikariConfig hikariConfig = new HikariConfig();
        hikariConfig.setDriverClassName(zookeeperConfigurationCentreProperties.getDriverClassName());
        hikariConfig.setJdbcUrl(zookeeperConfigurationCentreProperties.getJdbcUrl());
        hikariConfig.setUsername(zookeeperConfigurationCentreProperties.getUsername());
        hikariConfig.setPassword(zookeeperConfigurationCentreProperties.getPassword());
        HikariDataSource dataSource = new HikariDataSource(hikariConfig);
        System.out.println("注册数据库连接池为：" + JSON.toJSON(zookeeperConfigurationCentreProperties));
        return dataSource;
    }
}
*/
